1. Field of the Invention
This invention relates to a computer system provided with an external storage commonly used by a plurality of programs (application programs), and particularly relates to a file input/output control device for a computer system capable of reducing the time required for canceling exclusive control of file blocks.
2. Description of the Prior Art
When a plurality of application programs using a common file on an external storage are run concurrently, exclusive control is applied to avoid confusion in file contents. A file on an external storage is typically divided into a plurality of blocks, each of which contains a plurality of data records, and each block serves as a unit for input to or output from a buffer and a unit for exclusive control.
The exclusive control has various peculiar drawbacks. Now a conventional exclusive control method for file blocks is described.
The processing of quiet point establishment at an end of the application program after a plurality of blocks in a file on an external storage are transferred to a buffer for update or other processing is conventionally performed as described below. Note here that the blocks transferred to the buffer and subjected to update or other processing have been already placed under exclusive control.
An exclusive control means first activates a block write means by specifying all the blocks updated by the application program. The block write means writes a plurality of blocks in the buffer one by one to the file.
Upon completion of writing of all the blocks updated by the application program, the exclusive control means activates the exclusion cancellation means.
The exclusion cancellation means then cancels exclusive control for all the blocks used in that application at a time.
This conventional example is characterized by the bulk cancellation of exclusive control for all the blocks used in one application program, which results in an advantage of high efficiency and high speed processing.
As described above, a conventional exclusion cancellation method for file blocks is advantageous in that the bulk cancellation of exclusive control enables high speed processing. However, with processing speed of computers becoming higher, this advantage does not appear so attractive now. On the contrary, drawbacks as shown below are pointed out.
With the recent progress in semiconductor technology, external storages using semiconductors (semiconductor storages) have been put into practice and used in the same way as the conventional magnetic storage. Magnetic storages and semiconductor storages are both used as the external storage. In many cases, a single application uses file blocks on both devices.
Since a semiconductor storage does not have any mechanical drive, it is capable of much faster access compared with a magnetic storage. However, in a conventional exclusion cancellation method for file blocks, exclusive control is canceled at a time after writing all the blocks updated by the application program to the file on the external storage, and if there are both magnetic and semiconductor storage blocks, the semiconductor storage block is kept under exclusion mode still after completion of writing in shorter time with waiting for completion at the magnetic storage. This impairs improvement of efficiency. In other words, even if a semiconductor storage is introduced, it cannot contribute to a higher efficiency with utilization of the file on the semiconductor storage concurrently by a plurality of programs since the time while the blocks are under exclusive control cannot be reduced. This invention mainly addresses cancellation of exclusive control for a block when a quiet point is established.
The conventional system has an advantage in that once a quiet point is established upon the occurrence of a demand for establishment, a demand for rollback will never occur in the writing process to the buffer and releasing of exclusive control. Accordingly, when the exclusive control is released at any time after writing in the buffer, atomicity will not be lost. However, in practice, it is possible to cause failure of the external storage device or hang-up of the electronic computer during writing to the buffer. It thus becomes necessary to provide servers which can guarantee atomicity.
This nature is referred to as "durability." In order to assure durability, when failure is caused during the process of establishing the quiet point, the system automatically executes a rollback.
In the prior art, since the exclusive control is maintained during writing in the buffer, rollback can be executed even when a failure occurs. Even when a failure occurs during the release of the exclusive control after completion of the buffer writing process, since writing in the buffer has already been completed, atomicity can be guaranteed.
Another method for assuring atomicity upon occurrence of failure during buffer writing is to write in the buffer for which writing is held incomplete after recovery of the failure. To do this, it becomes necessary to store the content of the buffer in a non-volatile memory. In general, a non-volatile memory is expensive or low-speed, such as an external storage device, and has poor applicability in practical use.
However, owing to recent development of the electronic computer and lowering of cost for high speed non-volatile storage devices, such as an external storage device employing a semiconductor memory, it has become possible to guarantee atomicity by the foregoing method.